import request from '@/utils/service'

export default {
  // 获取数据
  async get(data) {
    return await request({
      url: '/api/news',
      method: 'get',
      params: data
    })
  },
  async deleOne(_id) {
    return await request({
      url: `/api/news/${_id}`,
      method: 'delete'
    })
  },
  async addBtn(data) {
    // return await request.post(`/api/news/`,{params:data})
    return await request({
      url: `/api/news`,
      method: 'post',
      data
    })
  }
}
